package edu.tongji.jiaowu.webapp.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.multiaction.MultiActionController;

import com.tongji.quickCRUDQ.util.RequestUtil;

import edu.tongji.jiaowu.service.ReexaminationStudentManager;

public class ReexamController extends MultiActionController {
	private ReexaminationStudentManager reexaminationStudentManager;
  
	public ModelAndView loadReexamStudents(HttpServletRequest request, HttpServletResponse response){
		try {
			String reexamYear=request.getParameter("reexamYear");
			String reexamSemester=request.getParameter("reexamSemester");
			reexaminationStudentManager.loadReexamStudents(reexamYear,reexamSemester);
			RequestUtil.writeJsonSuccess(response, "导入成功!");
		} catch (Exception e) {
			RequestUtil.writeJsonException(response, e);
		}
		return null;
	}

	public ReexaminationStudentManager getReexaminationStudentManager() {
		return reexaminationStudentManager;
	}

	public void setReexaminationStudentManager(ReexaminationStudentManager reexaminationStudentManager) {
		this.reexaminationStudentManager = reexaminationStudentManager;
	}
}
